::XN5106C_AMR_build_all VERSION
::%1 -- VERSION number

@if "%1"=="" echo Error!!! Format: %CHIP_ID_DEF%_AMR_build_all Version number
@if "%1"=="" goto end


:: Rmove all images's files
if not exist images\%1 mkdir images\%1 
rm -rf images/%1/

path %path%;D:\Keil\ARM\bin
SET ARMCC41INC=D:\Keil\ARM\RV31\INC
SET ARMCC41LIB=D:\Keil\ARM\RV31\LIB


:: build SLC_PCB_14_P04_02_V10
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=SLC_PCB_14_P04_02_V10
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build SLC_PCB_14_P04_02_V13
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=SLC_PCB_14_P04_02_V13
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build SLC_PCB_16_P04_30_V10
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=SLC_PCB_16_P04_30_V10
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build DLC_PCB_14_P04_07_V11
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=DLC_PCB_14_P04_07_V11
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build DLC_PCB_14_P04_07_V12
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=DLC_PCB_14_P04_07_V12
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build DLC_PCB_16_P06_01_V10
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=DLC_PCB_16_P06_01_V10
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

:: build FLC_PCB_14_P04_08_V10
SET CHIP_ID_DEF=XN5106C
SET BOARD_ID_DEF=FLC_PCB_14_P04_08_V10
SET CUSTOMER_DEF=COMMON
call xn5106x_amr_build_all %1

@echo *************************************************************
@echo *All (%1) versions are finished                    *
@echo *************************************************************

:end